<extend name="Common@Layout:hui-admin" />
<block name="title"><title>编辑权限</title></block>
<block name="style">
</block>

<block name="main">
<div class="pd-20">
	<form action="{:U('edit_post')}" method="post" class="form form-horizontal validator_form close-dialog shuaxin">
		
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>标题：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.name}" placeholder="" name="name" data-rule="链接名称:required;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>类型：</label>
			<div class="formControls col-6">
				<select class="input-text" style="width:auto" name="type">
				<foreach name="types" item="vo" key="k" >
					<option value="{$k}" <if condition="$info['type'] eq $k">selected</if>>{$vo}</option>
				</foreach>
				</select>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">url：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.url}" placeholder="" name="url">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-2">key：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text" value="{$info.key}" placeholder="" name="key">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-4">
				<input type="text" class="input-text" value="{$info.listorder|default=0}" placeholder="" name="listorder" data-rule="排序值:required;">
			</div>
		</div>
		<div class="row cl">
			<div class="col-10 col-offset-2">
				<input type="hidden" name="id" value="{$info.id}">
				<if condition="!$info"><input type="hidden" name="pid" value="{$_GET['pid']}"></if>
				<button type="submit" style="width:200px;" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-user-add").Validform({
		tiptype:2,
		callback:function(form){
			form[0].submit();
			var index = parent.layer.getFrameIndex(window.name);
			parent.$('.btn-refresh').click();
			parent.layer.close(index);
		}
	});

});
parent.shuaxin_nodes();
</script>
</block>